#ifndef H_YS_TABLE_
#define H_YS_TABLE_

#include <vector>
#include <algorithm>

#include "ysVec.hpp"

namespace n_ysUtil{

#include "detail/ysTable.inl"

template <typename TElem, // elem type
		int Dim,
		typename TCoord = ushort>
class table
{};

template <typename TElem, typename TCoord>
class table<TElem, 2, TCoord> : public table2D<TElem, TCoord>
{
public:
	table(const TCoord w, const TCoord h, const TElem initElem=TElem())
		:table2D<TElem, TCoord>(w, h, initElem)
	{}

	table(const table2D<TElem, TCoord>& other)
		:table2D<TElem, TCoord>(other)
	{}

	table(const TCoord s, const TElem initElem=TElem())
		:table2D<TElem, TCoord>(s, initElem)
	{}

	table(const TCoord w, const TCoord h,
		const TElem *initArr)// assume continuous storage
		:table2D<TElem, TCoord>(w, h, initArr)
	{}
};

//TODO: table3D has not been implemented yet
//template <typename TElem, typename TCoord>
//class table <TElem, 3, TCoord> : public table3D<TElem, TCoord>
//{};

}//namespace

#endif //header
